| Previous | Chapter contents | Chapter top | Section top | Next |
QuickTime VR maintains an internal back buffer for caching panoramic images. You can use the QTVRGetBackBufferMemInfo function to get information about the size of the back buffer that would be required for caching a panoramic image of a specified pixel format. See "Pixel Formats" for more information.
OSErr QTVRGetBackBufferMemInfo (
QTVRInstance qtvr,
UInt16resolution,
UInt32 cachePixelFormat,
SInt32*minCacheBytes,
SInt32*suggestedCacheBytes,
SInt32*fullCacheBytes);
The QTVRGetBackBufferMemInfo function returns information about the size of the back buffer that would be required to hold some or all of the panoramic image associated with the movie specified by the qtvr parameter. This is a "what-if" function: you specify a resolution and a pixel format, and QTVRGetBackBufferMemInfo returns several buffer sizes. You can use this information, in conjunction with the QTVRSetBackBufferPrefs function, to exercise some control over the size of the back buffer.
The resolution at which an image is to be displayed is specified by the resolution parameter, which is an index into the resolution bitmask returned by the QTVRGetAvailableResolutions function. Relative to that resolution and the pixel depth determined by the cachePixelFormat parameter, the QTVRGetBackBufferMemInfo function returns, through the minCacheBytes parameter, the minimum size of the buffer needed to display the movie. Using a buffer of that size, however, may result in a severely limited maximum field of view. You can call the QTVRGetViewingLimits function to determine the actual maximum field of view.
To allow full wide-angle zooming, you should use a buffer whose size is specified by either the suggestedCacheBytes parameter or the fullCacheBytes parameter.
| Previous | Chapter contents | Chapter top | Section top | Next |